load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/skylark:drake_py.bzl", "drake_py_binary", "drake_py_unittest")

package(default_visibility = ["//visibility:public"])

config_setting(
    name = "linux",
    constraint_values = ["@platforms//os:linux"],
)

config_setting(
    name = "osx",
    constraint_values = ["@platforms//os:osx"],
)

drake_py_binary(
    name = "rewrite_osx_ar_hidden",
    srcs = ["rewrite_osx_ar_hidden.py"],
)

exports_files([
    "py_env_runner.py",
])

drake_py_unittest(
    name = "pathutils_test",
    data = [
        ":pathutils.bzl",
    ],
    deps = [
        "@rules_python//python/runfiles",
    ],
)

add_lint_tests(
    python_lint_extra_srcs = ["py_env_runner.py"],
)
